﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace HTW_Red_October
{
	public partial class highScores : Form
	{
		public highScores()
		{
			InitializeComponent();
			//load();
		}
		
		private void closeButton_Click(object sender, EventArgs e)
		{
			startForm startForm1 = new startForm();
			startForm1.Show();
			this.Close();
		}

		//private void highScores_Load(object sender, EventArgs e)
		//{
		//	string[] scores = System.IO.File.ReadAllLines(@"C:\Users\Desktop\text.txt");

		//	for (int index = 0; index < 10; index++)
		//	{
		//		highScoreItemBox.Items.Add(scores[index][2] + " " + scores[index][0] + " " + scores[index][1] + "\n");
		//	}
		//}

		private void load()
		{
			//string[] scores = System.IO.File.ReadAllLines(@"H:\Documents\Junior Year\Period 6 JAVA\high score test.txt");

			TextReader tr = new StreamReader("high score test.txt");

			string input = tr.ReadLine();

			while (input != null)
			{
				string[] scores = input.Split(',');
				highScoreItemBox.Items.Add(scores[2] + " " + scores[0] + " " + scores[1] + "\n");
			}
		}
	}
}
